<?php
/**
 * BaseConfiger->get('com.dudulook.config.web:xxx.yyy'); //web.config.php
 * BaseConfiger->get('config.web:pageContext'); //web.config.php
 * @author xilou
 *
 */
class BaseConfiger
{
	public function get($path)
	{
		if($path == '') throw new Exception('BaseConfiger::get($path):$path empty');
		$pos = strpos($path, ':');
		
		if($pos === false) return import($path);
		
		$res = import(substr($path, 0, $pos));
		$keyPath = substr($path, $pos + 1);
		$keyArray = explode('.', $keyPath);
		foreach($keyArray as $item)
		{
			$res = $res[$item];
		}
		return $res;
	}
}
?>